//
//  HMMeTableViewController.swift
//  Weibo
//
//  Created by Apple on 2017/7/21.
//  Copyright © 2017年 KY. All rights reserved.
//

import UIKit

class HMMeTableViewController: UITableViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

//        setupNavUI()
        setupPushButton()
    }
    
    
    //  设置导航栏push按钮
    private func setupPushButton() {
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "push", target: self, action: #selector(pushAction))
    }
    
    //  push操作
    @objc private func pushAction() {
        let testVC = HMTestViewController()
        self.navigationController?.pushViewController(testVC, animated: true)
    }
    
    
    //  设置导航栏按钮
    private func setupNavUI() {
        
        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "注册", target: self, action: #selector(registerAction))
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "登录", target: self, action: #selector(loginAction))
        
    }
    
    //  MARK:   --注册和登录点击事件
    @objc private func registerAction() {
        print("注册")
    }
    
    @objc private func loginAction() {
        print("登录")
    }

}
